﻿using CommunityToolkit.Maui;
using Event.Services;
using Event.ViewModels;

namespace Event;

public static class MauiProgram {
    public static MauiApp CreateMauiApp() {
        var builder = MauiApp.CreateBuilder();
        builder.UseMauiApp<App>().UseMauiCommunityToolkit().ConfigureFonts(
            fonts => {
                fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
            });

        builder.Services.AddScoped<MainPage, MainPageViewModel>();
        builder.Services.AddScoped<FunctionPage, FunctionPageViewModel>();
        builder.Services.AddScoped<IPoetryService, PoetryService>();

        return builder.Build();
    }
}